function Xtransformed= conditionalForecastTransform(X,transformCell)
% function Xtransformed= conditionalForecastTransform(X,transformCell)
% Transform the forecast in X according to transformCell 
% Input 
% X [Nforc Nser] 
% transformCell : cell with string 
% .none
% .cumsum           Cummulative sum 
% .annualize        Multiply by 4 
% Output 
% Xtransformed [Nforc Nser]
[Nforc Nseries]=size(X); 
Xtransformed=zeros(size(X)); 
for ii=1:Nseries     
    if strcmpi(transformCell{ii},'none')==true
        disp('No transformation')
        Xtransformed(:,ii)=X(:,ii);
    elseif strcmpi(transformCell{ii},'annualize')==true
        disp('Annualized')        
        Xtransformed(:,ii)=4*X(:,ii);
    elseif strcmpi(transformCell{ii},'cumsum')==true
        Xtransformed(:,ii)=cumsum(X(:,ii)); 
        disp('Cumsum');        
    else 
        disp('Error, cannot match transformation') 
        error('Error, cannot match transformation') 
    end         
end 
